const express = require('express');
const router = express.Router();
const FeedbackController = require('../controllers/feedbackController');
const adminAuth = require('../middleware/adminAuth');

// 小程序端接口
router.post('/', FeedbackController.addFeedback);
router.get('/user', FeedbackController.getUserFeedbacks);

// 管理端接口（需要认证）
router.get('/admin/list', adminAuth, FeedbackController.getFeedbackList);
router.put('/admin/:id/status', adminAuth, FeedbackController.updateFeedbackStatus);
router.delete('/admin/:id', adminAuth, FeedbackController.deleteFeedback);

module.exports = router;

